#include "BlitEffect.h"

namespace egg{

    BlitEffect::BlitEffect():
    PostEffect(gGPUProgramGroup->getItem("blit")){
        mRect=NumericParamPtr(new NumericParam(GPT_Vec4,"uRect"));
        mTexture0=TextureParamPtr(new TextureParam("uTexture0"));
        mParamMap.bindParam(mRect);
        mParamMap.bindParam(mTexture0);
    }

    void BlitEffect::render(RenderContext& _context){
        mParamMap.activate();
        gGeometryGroup->mQuad->draw(DM_Triangles);
    }

}